<?php

namespace App\Model;

use App\Observers\ConfigObserver;
use Illuminate\Database\Eloquent\Model;

class Config extends Model
{
    protected $fillable = ['name','data'];

    //手册搜索：$casts
    protected  $casts = [
        'data'=>'array'
    ];
//    public static function boot ()
//    {
//        Config::observe ( ConfigObserver::class );
//    }
public static function boot(){
    Config::observe(ConfigObserver::class);
}
}
